import request from '@/utils/request.js'

// 查询中医问题列表
export function listProblem(query) {
    return request({
        url: '/medical/problem/list',
        method: 'get',
        params: query
    })
}

// 查询中医问题详细
export function getProblem(id) {
    return request({
        url: '/medical/problem/' + id,
        method: 'get'
    })
}

// 新增中医问题
export function addProblem(data) {
    return request({
        url: '/medical/problem',
        method: 'post',
        data: data
    })
}

// 修改中医问题
export function updateProblem(data) {
    return request({
        url: '/medical/problem',
        method: 'put',
        data: data
    })
}

// 删除中医问题
export function delProblem(id) {
    return request({
        url: '/medical/problem/' + id,
        method: 'delete'
    })
}

// 删除中医问题
export function delProblemAnswer(id) {
    return request({
        url: '/medical/problem/deleteAnswer/' + id,
        method: 'delete'
    })
}

export function problemAndAnswerList() {
    return request({
        url: '/medical/problem/problemList',
        method: 'get'
    })
}
